    <div class="tab-wrap">
        <ul class="tab-nav nav">

            <li class="current"><a href="{:U('Admin/Addons/adminList',array('name'=>'Mail'))}">邮件配置</a></li>
            <li><a href="{:addons_url('Mail://Mail/mailList')}">邮箱列表</a></li>
            <li><a href="{:addons_url('Mail://Mail/sendEmail')}">发送邮件</a></li>
            <li><a href="{:addons_url('Mail://Mail/history')}">邮件历史</a></li>

        </ul>
        <div class="tab-content">
            <form action="{:addons_url('Mail://Mail/saveConfig')}" method="post" class="form-horizontal">
                <volist name="_list" id="config">
                    <div class="form-item">
                        <label class="item-label">{$config.title}<span class="check-tips">（{$config.remark}）</span> </label>
                        <div class="controls">
                            <switch name="config.type">
                                <case value="0">
                                    <input type="text" class="text input-small" name="config[{$config.name}]" value="{$config.value}">
                                </case>
                                <case value="1">
                                    <input type="text" class="text input-large" name="config[{$config.name}]" value="{$config.value}">
                                </case>
                                <case value="2">
                                    <label class="textarea input-large">
                                        <textarea name="config[{$config.name}]">{$config.value}</textarea>
                                    </label>
                                </case>
                                <case value="3">
                                    <label class="textarea input-large">
                                        <textarea name="config[{$config.name}]">{$config.value}</textarea>
                                    </label>
                                </case>
                                <case value="4">
                                    <select name="config[{$config.name}]">
                                        <volist name=":parse_config_attr($config['extra'])" id="vo">
                                            <option value="{$key}" <eq name="config.value" value="$key">selected</eq>>{$vo}</option>
                                        </volist>
                                    </select>
                                </case>
                                <case value="5"><!--增加富文本和非明文-->
                                    <label class="textarea">
                                        <textarea name="config[{$config.name}]">{$config.value}</textarea>
                                        {:hook('adminArticleEdit', array('name'=>$field['names'],'value'=>$config.name,'id'=>$config.name))}
                                    </label>
                                </case>
                                <case value="6">
                                    <input type="password" class="text input-large" name="config[{$config.name}]" value="{$config.value}">
                                </case>
                            </switch>

                        </div>
                    </div>
                </volist>
                <div class="form-item">
                    <label class="item-label"></label>
                    <div class="controls">
                        <empty name="_list"><button type="submit" disabled class="btn submit-btn disabled" target-form="form-horizontal">确 定</button><else/><button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button></empty>

                        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>

                        <button onclick="javascript:sendTestMail($(this));return false;" class="btn btn-return" data_url="{:addons_url('Mail://Mail/sendTestMail')}">发送测试邮件</button>
                    </div>
                </div>
            </form>
        </div>
    </div>




<block name="script">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>

    <script>
        /**
         * 发送测试邮件
         * @param obj
         */
        function sendTestMail(obj){
            obj.addClass('submit-btn')
            obj.html('发送中....')
            $.post(obj.attr('data_url'),{},function(res){
                if(res.status){
                    updateAlert('发送成功','alert-success');
                }else{
                    updateAlert('发送失败');
                }
                obj.removeClass('submit-btn')
                obj.html('发送测试邮件')

                setTimeout(function(){
                    $('#top-alert').find('button').click();
                },1500);
            },'json')

        }
    </script>
</block>